package com.example.sys.attachment.service;

import org.springframework.web.multipart.MultipartFile;


/***
 *
 * 附件服务类，保存文件的内容
 */
public interface SysFileService {

    /***
     * 把文件上传
     * @param file
     * @return
     * @throws Exception
     */
    public String write(MultipartFile file) throws Exception;


    /***
     * 通过路径去加载文件的流
     * @param path
     * @return
     * @throws Exception
     */
    public byte[] read(String path) throws Exception;


    /***
     * 删除附件
     * @param path
     * @throws Exception
     */
    public void delete(String path) throws Exception;
}
